#!/usr/bin/python3.8
from pyecharts import options as opts
from pyecharts.charts import Tree

from ASTdata import treedata

c = (
    Tree()
    .add("", treedata,
        collapse_interval=2,
        orient="TB",
        label_opts=opts.LabelOpts(
            position="top",
            horizontal_align="right",
            vertical_align="middle",
        ),
    )
    .set_global_opts(title_opts=opts.TitleOpts(title="Abstract Syntax Tree"))
    .render("build/AST.html")
)
